﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace Pavilion.DesignerTool
{
    public class UndoRedoTextureItem : IUndoRedoItem
    {
        Texture2D undoTexture, redoTexture;
        TextureData textureData;

        public UndoRedoTextureItem(TextureData textureData, Texture2D undoTexture)
        {
            this.textureData = textureData;
            this.undoTexture = undoTexture;
            this.redoTexture = textureData.Texture.TextureItem;
        }

        public void Undo()
        {
            textureData.UpdateTexture(undoTexture);
        }

        public void Redo()
        {
            textureData.UpdateTexture(redoTexture);
        }
    }
}
